﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="UserInRole.aspx.cs" Inherits="ExamAnalysis.Manage.UserInRole" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<ext:Panel ID="Panel1" runat="server" Width="400" Height="300">
            <LayoutConfig>
                <ext:HBoxLayoutConfig Align="Stretch" Padding="5" />
            </LayoutConfig>
            <Items>
                <ext:GridPanel
                    ID="GridPanel2" 
                    runat="server"
                    MultiSelect="true"
                    Title="该组包含的用户"
                    Flex="1"
                    Width="200"
                    Margins="0 0 0 3">
                    <Store>
                        <ext:Store ID="Store2" runat="server" >
                            <Model>
                                <ext:Model ID="Model2" runat="server" IDProperty="UserName">
                                    <Fields>
                                        <ext:ModelField Name="UserId" />
                                        <ext:ModelField Name="UserName" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel>
                        <Columns>
                            <ext:Column ID="Column4" runat="server" Text="包含的用户" Width="160" DataIndex="UserName" Flex="1">
                    </ext:Column>
                        </Columns>
                    </ColumnModel>
                    <TopBar>
            <ext:Toolbar ID="Toolbar2" runat="server">
                    <Items>
                    <ext:DropDownField ID="DropDownField1" runat="server" Width="300" FieldLabel="选择分组" Text="请选择">
                            <Component>
                                <ext:GridPanel ID="GridPanel3" Height="200" runat="server">
                                    <ColumnModel>
                                        <Columns>
                                            <ext:Column ID="Column12" runat="server" Width="150" Text="组名" DataIndex="RoleName" />
                                        </Columns>
                                    </ColumnModel>
                                    <SelectionModel>
                                         <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single" />
                                    </SelectionModel>
                                        <Store>
                    <ext:Store ID="Store3" runat="server">
                        <Model>
                            <ext:Model ID="Model4" runat="server" IDProperty="RoleName">
                                <Fields>
                                    <ext:ModelField Name="RoleId" />
                                    <ext:ModelField Name="RoleName" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <BottomBar>
                <ext:Toolbar ID="Toolbar5" runat="server">
                <Items>
                 <ext:Button ID="Button2" Text="选择" runat="server" OnDirectClick="Button_Click" />
                 </Items>
                </ext:Toolbar>
                </BottomBar>
                                </ext:GridPanel>
                            </Component>
                        </ext:DropDownField>
                </Items>
                </ext:Toolbar>
            </TopBar>                     
        <SelectionModel>
           <ext:RowSelectionModel ID="RowSelectionModel2" runat="server" Mode="Single">
                        </ext:RowSelectionModel>
        </SelectionModel>
                </ext:GridPanel>
            </Items>
            <BottomBar>
                <ext:Toolbar ID="Toolbar1" runat="server">
                    <Items>
                        <ext:ToolbarFill ID="ToolbarFill1" runat="server" />
                       <ext:Button ID="Button1" runat="server" Text="向组中添加用户"  OnDirectClick="Button2_Click">
                       </ext:Button>
                       <ext:Button ID="Button4" runat="server" Text="删除选中用户"  OnDirectClick="Button4_Click">
                       </ext:Button>
                    </Items>
                </ext:Toolbar>                
            </BottomBar>
        </ext:Panel>
        <ext:Window 
            ID="FormWindow" 
            runat="server" 
            Title="分组信息编辑" 
            Width="420" 
            Height="300"           
            BodyPadding="10" 
            Resizable="false" 
            Closable="True"
            Layout="Fit" AutoShow="False" HideCollapseTool="False" Hidden="True" HideMode="Visibility">
            <Items>
                <ext:FormPanel 
                    ID="FormPanel1" 
                    runat="server" 
                    Border="false" 
                    BodyStyle="background-color:transparent;"
                    DefaultAnchor="-10"
                    Layout="Form">
                    <Items>
                                <ext:GridPanel ID="GridPanel1" Height="200" runat="server">

                                    <ColumnModel>
                                        <Columns>
                                            <ext:Column ID="Column1" runat="server" Width="250" Text="用户名" DataIndex="UserName" />
                                        </Columns>
                                    </ColumnModel>
                                    <SelectionModel>
                                         <ext:RowSelectionModel ID="RowSelectionModel3" runat="server" Mode="Single" />
                                    </SelectionModel>
                                        <Store>
                    <ext:Store ID="Store1" runat="server" >
                        <Model>
                            <ext:Model ID="Model1" runat="server" IDProperty="UserName">
                                <Fields>
                                    <ext:ModelField Name="UserId" />
                                    <ext:ModelField Name="UserName" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <BottomBar>
                <ext:Toolbar ID="Toolbar3" runat="server">
                </ext:Toolbar>
                </BottomBar>
                                </ext:GridPanel>  
                    </Items>
                </ext:FormPanel>
            </Items>
            <BottomBar>
        <ext:Toolbar ID="Toolbar4" runat="server">
                    <Items>
                        <ext:Button ID="Button6" runat="server" Icon="Add" Text="确认" Visible="true">
                          <DirectEvents>
                                <Click OnEvent="Add_Click" />
                           </DirectEvents>
                        </ext:Button>                   
                        <ext:ToolbarFill ID="ToolbarFill2" runat="server" /> 
                    </Items>
                </ext:Toolbar>
            </BottomBar>
        </ext:Window>
</asp:Content>
